package demo;

import org.junit.Test;
import org.weixin4j.qy.WeixinException;
import org.weixin4j.qy.WeixinQy;
import org.weixin4j.qy.model.CorpType;
import org.weixin4j.qy.model.Message.TextMessage;

/**
 * @title: qx
 * @projectName JeePlus
 * @description: TODO
 * @author Administrator
 * @date 2019/11/1116:49
 */

public class qx {
    @Test
 public void test() throws WeixinException {
        WeixinQy qy = new WeixinQy();

        TextMessage message = new TextMessage();
        message.setAgentid(1000017);
        message.setMsgtype("text");
        message.setTouser("tls131421");
        message.setText("测试应用");
        try {
            System.out.println(qy.userMessage().UserMessageSnd(qy.getToken(CorpType.TXL).getAccess_token(), message));
        }
        catch (Exception e){
            System.out.println(e.getMessage());
        }

 }
}
